﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace SimpleScrum.Core.Entities
{
    public class UserStory
    {

        public enum StatusEnum
        {
           Assigned = 0,
            Unassigned = 1
        }

        public enum PriorityEnum
        {
           High=0,
           Medium = 1,
           Low = 2
        }

        [Display(Name = "User Story ID")]
        public virtual Guid Id { get; protected set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Title")]
        [StringLength(50, ErrorMessage = "User Story Title must be at most 50 characters long")]
        public virtual string Title { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "Description")]
        [StringLength(620, ErrorMessage = "User Story Details must be at most 620 characters long")]
        public virtual string Details { get; set; }

        [Display(Name = "Work Hour")]
        public virtual int WorkHour { get; set; }

        [Display(Name = "Points")]
        public virtual int Points { get; set; }

        [Display(Name = "Priority")]
        public virtual int Priority { get; set; }

        [Display(Name = "Assign To")]
        public virtual Guid AssignTo { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Assign Date")]
        public virtual DateTime AssignDate { get; set; }

        [Required]
        [Display(Name = "Created By")]
        public virtual Guid CreatedBy { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Created Date")]
        public virtual DateTime CreatedDate { get; set; }

        [Display(Name = "Project")]
        public virtual Project Project { get; set; }

        [Display(Name = "Status")]
        public virtual int Status { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Last Update")]
        public virtual DateTime LastUpdate { get; set; }

    }
}